﻿using Abp.Application.Services;
using App.Organizations.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace App.Organizations
{
    public interface IOrganizationUnitAppService : IApplicationService
    {
        /// <summary>
        /// 获取团队记录
        /// </summary>
        /// <returns></returns>
        Task<List<OrganizationUnit>> GeTeams(Expression<Func<OrganizationUnit, bool>> predicate = null);

        /// <summary>
        /// 创建部门
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<OrganizationUnit> CreateTeam(OrganizationUnitDto dto);

        /// <summary>
        /// 修改部门
        /// </summary>
        /// <param name="id"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task UpdateTeam(int id, OrganizationUnitDto dto);

        /// <summary>
        /// 删除组织机构
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(int id);
    }
}
